home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: Dennis Vadura <dvadura@watdragon.waterloo.edu>
- Subject: v20i077: dmake - dmake version 3.7, Patch02b/12
- Message-ID: <1991Jun29.222504.4007@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 15645fc359d4053ff6cfe225c44a8a91
- Date: Sat, 29 Jun 1991 22:25:04 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
- Posting-number: Volume 20, Issue 77
- Archive-name: dmake/patch02b
- Patch-To: dmake: Volume 19, Issue 22-58
-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 06/28/1991 13:56 UTC by dvadura@watdragon
- # Source directory /u2/dvadura/src/generic/dmake/dist/addresses
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 404337 -rw-r----- dm37p2
- #
- if test -r _shar_seq_.tmp; then
- echo 'Must unpack archives in sequence!'
- echo Please unpack part `cat _shar_seq_.tmp` next
- exit 1
- fi
- # ============= dm37p2 ==============
- if test -f 'dm37p2' -a X"$1" != X"-c"; then
- echo 'x - skipping dm37p2 (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting dm37p2 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'dm37p2' &&
- X#!/bin/sh
- X# dodiff: Directory tree maintainer (v1.1)
- X#
- X# DMAKE 3.7 PATCH #2
- X# ------------------
- X# Priority: Medium
- X#
- X# Prerequisite: dmake 3.7 patch level 1 full distribution.
- X#
- X# Location: You can obtain a copy of the patch from watmsg.uwaterloo.edu
- X# via anonymous ftp from the directory pub/dmake. The file is
- X# dmake37-patch2.Z. The patch is also submitted for posting
- X# to comp.sources.misc.
- X#
- X# Application: Change directory to the source directory containing the
- X# dmake sources and run the patch through /bin/sh. It constructs
- X# any required subdirectories and applies the patch program as
- X# needed to apply patches to files. If you obtain the patch
- X# files from a news group then you must first build the patch
- X# source by running all parts of the patch through unshar or
- X# /bin/sh.
- X#
- X# Acknowledgment: Thanks to everyone who wrote with suggestions or bug fixes.
- X# In most cases your fixes and/or suggestions were
- X# incorporated into the sources. Your continued input makes
- X# dmake a better tool.
- X#
- X#
- X# DETAILS OF FIXES:
- X# -----------------
- X# - Fixed a bug in function.c. If you used a $(shell ...) macro in a line
- X# which got expanded from within the input buffer Buffer (eg. in a rule
- X# definition) nasty things could happen since _exec_shell re-used Buffer
- X# when it shouldn't have.
- X#
- X# - Made sure that -v and -n flags do not take effect across a $(shell ...)
- X# macro expansion. This ensures that $(shell ...) recipes are always
- X# executed when the macro is expanded and never contain noise from a -v
- X# flag. Dunno how I missed this the first time around.
- X#
- X# - Fixed a bug that set Current_target to NULL when making successive recipe
- X# lines individually. This meant that temp files were being deleted late,
- X# possibly from the wrong places, and hence not deleted at all.
- X#
- X# - Fixed several inference bugs. Nothing too major:
- X#
- X# 1. a recipe of the form
- X# %.foo:
- X# @[
- X# stuff ...
- X# ]
- X# didn't get the group recipe attribute attached to the %.foo node
- X# so when the inference algorithm was run it failed to attach the
- X# correct attribute to go along with the new recipe.
- X#
- X# 2. Inference algorithm now marks for REMOVAL, ALL intermediate nodes
- X# (it did this before too -- but by luck), and marks ALL nodes as
- X# TARGETS, and all but the first node as being INFERRED. I doubt
- X# that anyone will notice these changes. I had to have a really
- X# screwy makefile to find the bug.
- X#
- X# - Fixed $(shell ...) macro so that it can be nested to arbitrary depths.
- X# It uses a single temporary file for the purpose and keeps reusing it for
- X# each nested instance. Works like a charm.
- X#
- X# - Fixed bug in rulparse.c where an attribute flag variable was of type
- X# int and not t_attr as it should be. This caused problems on 16-bit
- X# machines (reported by lots of people).
- X#
- X# - Fixed a bug reported by paul@halserv2.hal.com, dmake.c line 373, would
- X# dereference a NULL pointer if the hash table didn't contain an entry.
- X#
- X# - Fixed a bug reported by paul@halserv2.hal.com, rulparse.c line 949
- X# would dereference a NULL pointer if it tried to match a certain sequence
- X# of %-meta rules.
- X#
- X# - Fixed a bug reported by paul@halserv2.hal.com, make.c, the SET_TOKEN
- X# call was getting called with a NULL pointer.
- X#
- X# - Minor tweaks to the OS/2 scripts as reported by Frank Waley. Should make
- X# MSC compiles work now.
- X#
- X# - Changed sysvr4/stdarg.h to ensure that va_dcl is defined.
- X#
- X# - Modified man page. The diffs would have been bigger than the source so
- X# I just included new copies.
- X#
- X#
- X#
- X# DETAILS OF ADDITIONS/CHANGES:
- X# -----------------------------
- X# - Added a sysvr3/pwd directory along with getcwd.c. The reason for this
- X# addition is to hopefully eliminate once and for all the annoying
- X# "lost a child" bug. If you see this bug appear then remake dmake with
- X#
- X# make sysvr3pwd
- X# or make xenixpwd
- X#
- X# Both create a version of dmake that uses a local version of getcwd rather
- X# than the C-library version. Thanks to Gwyn Dyer for providing the code
- X# to getcwd.c. I used his version as it compiled on a xenix machine and
- X# seemed to be the more widely used one. Thanks to all that sent me copies
- X# of it. I hope this gets rid of the lost child issue once and for all.
- X#
- X# - The MSDOS version now behaves identically to the UNIX versions when
- X# running recipes containing embedded cd calls. I changed dmake to restore
- X# the directory it was in prior to invoking a child process.
- X#
- X# The following recipe will now behave identically under UNIX and DOS
- X#
- X# all:
- X# cd foo; make ...
- X# cd fee; make ...
- X#
- X# Previously to this change, the DOS version of DMAKE would have been in
- X# the foo directory after the first line of the recipe, and would not
- X# find fee.
- X#
- X# - Added the -B flag. This is in response to several requests at supporting
- X# spaces in front of recipe lines. This does not come without a price.
- X# By default the flag is off and tabs are required to start recipe lines
- X# unless it is a group recipe. If you turn the flag on, either through
- X# supplying -B on the command line or by putting ".NOTABS := y" in the
- X# makefile then when dmake scans non-group recipes they are terminated at
- X# the first line that is only white space or contains no leading white space
- X# and is either a macro definition or a rule definition.
- X#
- X# Consider the following makefile:
- X#
- X# all:
- X# <tab> echo hi there
- X# <space>echo e:test
- X# <tab> echo hello
- X#
- X# By default the recipe for all is simply: "echo hi there", and the remaining
- X# two lines are parsed as a new rule definition with the associated recipe
- X# being "echo hello". If you supply -B, then the recipe for 'all' is all
- X# three lines above, since the second recipe line now begins with a space.
- X#
- X# If you change the makefile to contain:
- X#
- X# all:
- X# <tab> echo hi there
- X#
- X# <space>echo e:test
- X# <tab> echo hi there
- X#
- X# then the -B flag has no visible effect. The makefile is parsed the
- X# same in both cases as the first recipe is terminated by the empty line.
- X# or a valid recipe rule.
- X#
- X# If you now change the makefile to contain:
- X#
- X# all:
- X# <tab> echo hi there
- X#
- X# <tab> echo e:test
- X# <tab> echo hi there
- X#
- X# then by default all three lines form the recipe for 'all'.
- X# Specifying -B terminates the first recipe after the first line and begins
- X# a new rule definition with the line "echo e:test".
- X#
- X# In summary:
- X# By default: (no -B) a recipe is terminated by a line containing some
- X# text that does not begin with a <tab>.
- X#
- X# Specify -B: A recipe is terminated by a line that is only white space
- X# or by a line containg text that contains NO leading
- X# white space.
- X#
- X# You can use the .NOTABS macro to set/reset this behaviour at will from
- X# within a makefile. See the man page.
- X#
- X# - Added OSRELEASE=coherent targets and directories to support Coherent
- X# systems. Patches provided by David Fenyes (dfenyes@thesis1.med.uth.tmc.edu).
- X#
- X# - Added OSRELEASE=msdos OSENVIRONMENT=ztcdos targets and directories to
- X# support making of dmake using Zortech C++ 2.1. Patches provided by
- X# David Engel (ods@utdallas.edu).
- X#
- X# Remove Obsolete files from distribution
- X
- X# Now use a shar archive to add any new files to the distribution
- X# This is a shell archive (produced by shar 3.49)
- X# To extract the files from this archive, save it to a file, remove
- X# everything above the "!/bin/sh" line above, and type "sh file_name".
- X#
- X# made 06/28/1991 13:27 UTC by dvadura@watdragon
- X# Source directory /u2/dvadura/src/generic/dmake/src
- X#
- X# existing files will NOT be overwritten unless -c is specified
- X#
- X# This shar contains:
- X# length mode name
- X# ------ ---------- ------------------------------------------
- X# 125864 -rw-r----- man/dmake.p
- X# 98450 -r--r----- man/dmake.tf
- X# 1976 -r--r----- msdos/ztcdos/config.h
- X# 1990 -rw-r----- msdos/ztcdos/config.mk
- X# 473 -r--r----- msdos/ztcdos/environ.c
- X# 1 -rw-r----- msdos/ztcdos/lib.rsp
- X# 1 -rw-r----- msdos/ztcdos/libswp.rsp
- X# 3232 -rw-r----- msdos/ztcdos/mk.bat
- X# 3235 -rw-r----- msdos/ztcdos/mkswp.bat
- X# 614 -rw-r----- msdos/ztcdos/obj.rsp
- X# 626 -rw-r----- msdos/ztcdos/objswp.rsp
- X# 5417 -rw-r----- msdos/ztcdos/public.h
- X# 3861 -rw-r----- msdos/ztcdos/startup.mk
- X# 1738 -r--r----- msdos/ztcdos/tempnam.c
- X# 1940 -r--r--r-- unix/coherent/config.h
- X# 765 -rw-r--r-- unix/coherent/config.mk
- X# 306 -r--r--r-- unix/coherent/getcwd.c
- X# 2405 -rw-r--r-- unix/coherent/make.sh
- X# 5318 -rw-r----- unix/coherent/public.h
- X# 3221 -rw-r--r-- unix/coherent/startup.mk
- X# 469 -r--r--r-- unix/coherent/stdarg.h
- X# 346 -r--r--r-- unix/coherent/stdlib.h
- X# 133 -r--r--r-- unix/coherent/time.h
- X# 4312 -r--r--r-- unix/coherent/vfprintf.c
- X# 559 -rw-r----- unix/sysvr3/pwd/config.mk
- X# 5834 -r--r----- unix/sysvr3/pwd/getcwd.c
- X# 2739 -rw-r----- unix/sysvr3/pwd/make.sh
- X# 5318 -rw-r----- unix/sysvr3/pwd/public.h
- X# 3221 -rw-r----- unix/sysvr3/pwd/startup.mk
- X#
- X# ============= man/dmake.p ==============
- Xif test ! -d 'man'; then
- X echo 'x - creating directory man'
- X mkdir 'man'
- Xfi
- Xif test -f 'man/dmake.p' -a X != X; then
- X echo 'x - skipping man/dmake.p (File already exists)'
- Xelse
- Xecho 'x - extracting man/dmake.p (Text)'
- Xsed 's/^X//' << 'SHAR_EOF' > 'man/dmake.p' &&
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XNNAAMMEE
- XX ddmmaakkee - maintain program groups, or interdependent files
- XX
- XSSYYNNOOPPSSIISS
- XX ddmmaakkee [-ABceEhiknpqrsStTuVx] [-v{dfimt}] [-P#] [-{f|C|K}
- XX file] [macro[*][+][:]=_v_a_l_u_e ...] [target ...]
- XX
- XDDEESSCCRRIIPPTTIIOONN
- XX ddmmaakkee executes commands found in an external file called a
- XX _m_a_k_e_f_i_l_e to update one or more target names. Each target
- XX may depend on zero or more prerequisite targets. If any of
- XX the target's prerequisites is newer than the target or if
- XX the target itself does not exist, then ddmmaakkee will attempt to
- XX make the target.
- XX
- XX If no --ff command line option is present then ddmmaakkee searches
- XX for an existing _m_a_k_e_f_i_l_e from the list of prerequisites
- XX specified for the special target _._M_A_K_E_F_I_L_E_S (see the STARTUP
- XX section for more details). If "-" is the name of the file
- XX specified to the --ff flag then ddmmaakkee uses standard input as
- XX the source of the makefile text.
- XX
- XX Any macro definitions (arguments with embedded "=" signs)
- XX that appear on the command line are processed first and
- XX supersede definitions for macros of the same name found
- XX within the makefile. In general it is impossible for defin-
- XX itions found inside the makefile to redefine a macro defined
- XX on the command line, see the MACROS section for an excep-
- XX tion.
- XX
- XX If no _t_a_r_g_e_t names are specified on the command line, then
- XX ddmmaakkee uses the first non-special target found in the
- XX makefile as the default target. See the SSPPEECCIIAALL TTAARRGGEETTSS
- XX section for the list of special targets and their function.
- XX ddmmaakkee is a re-implementation of the UNIX Make utility with
- XX significant enhancements. Makefiles written for most previ-
- XX ous versions of _M_a_k_e will be handled correctly by ddmmaakkee..
- XX Known differences between ddmmaakkee and other versions of make
- XX are discussed in the CCOOMMPPAATTIIBBIILLIITTYY section found at the end
- XX of this document.
- XX
- XOOPPTTIIOONNSS
- XX --AA Enable AUGMAKE special inference rule transformations
- XX (see the "PERCENT(%) RULES" section), these are set to
- XX off by default.
- XX
- XX --BB Enable the use of spaces instead of <tabs> to begin
- XX recipe lines. This flag equivalent to the .NOTABS spe-
- XX cial macro and is further described below.
- XX
- XX --cc Use non-standard comment stripping. If you specify --cc
- XX then ddmmaakkee will treat any ## character as a start of
- XX
- XX
- XX
- XVersion 3.70 UW 1
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX comment character wherever it may appear unless it is
- XX escaped by a \.
- XX
- XX --CC [[++]]ffiillee
- XX This option writes to _f_i_l_e a copy of standard output
- XX and standard error from any child processes and from
- XX the ddmmaakkee process itself. If you specify a ++ prior to
- XX the file name then the text is appended to the previous
- XX contents of _f_i_l_e. This option is active in the MSDOS
- XX implementation only and is ignored by non-MSDOS ver-
- XX sions of ddmmaakkee..
- XX
- XX --ee Read the environment and define all strings of the form
- XX 'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
- XX EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'. The environment
- XX is processed prior to processing the user specified
- XX makefile thereby allowing definitions in the makefile
- XX to override definitions in the environment.
- XX
- XX --EE Same as -e, except that the environment is processed
- XX after the user specified makefile has been processed
- XX (thus definitions in the environment override defini-
- XX tions in the makefile). The -e and -E options are
- XX mutually exclusive. If both are given the latter takes
- XX effect.
- XX
- XX --ff ffiillee
- XX Use ffiillee as the source for the makefile text. Only one
- XX --ff option is allowed.
- XX
- XX --hh Print the command summary for ddmmaakkee.
- XX
- XX --ii Tells ddmmaakkee to ignore errors, and continue making other
- XX targets. This is equivalent to the .IGNORE attribute
- XX or macro.
- XX
- XX --KK ffiillee
- XX Turns on ..KKEEEEPP__SSTTAATTEE state tracking and tells ddmmaakkee to
- XX use _f_i_l_e as the state file.
- XX
- XX --kk Causes ddmmaakkee to ignore errors caused by command execu-
- XX tion and to make all targets not depending on targets
- XX that could not be made. Ordinarily ddmmaakkee stops after a
- XX command returns a non-zero status, specifying --kk causes
- XX ddmmaakkee to ignore the error and continue to make as much
- XX as possible.
- XX
- XX --nn Causes ddmmaakkee to print out what it would have executed,
- XX but does not actually execute the commands. A special
- XX check is made for the string "$(MAKE)" inside a recipe
- XX line, if found, the line is expanded and invoked,
- XX thereby enabling recursive makes to give a full
- XX
- XX
- XX
- XVersion 3.70 UW 2
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX description of all that they will do. The check for
- XX "$(MAKE)" is disabled inside group recipes.
- XX
- XX --pp Print out a version of the digested makefile in human
- XX readable form. (useful for debugging, but cannot be
- XX re-read by ddmmaakkee)
- XX
- XX --PP## On systems that support multi-processing cause ddmmaakkee to
- XX use _# concurrent child processes to make targets. See
- XX the "MULTI PROCESSING" section for more information.
- XX
- XX --qq Check and see if the target is up to date. Exits with
- XX code 0 if up to date, 1 otherwise.
- XX
- XX --rr Tells ddmmaakkee not to read the initial startup makefile,
- XX see STARTUP section for more details.
- XX
- XX --ss Tells ddmmaakkee to do all its work silently and not echo
- XX the commands it is executing to stdout (also suppresses
- XX warnings). This is equivalent to the .SILENT attri-
- XX bute or macro.
- XX
- XX --SS Force sequential execution of recipes on architectures
- XX which support concurrent makes. For backward compati-
- XX bility with old makefiles that have nasty side-effect
- XX prerequisite dependencies.
- XX
- XX --tt Causes ddmmaakkee to touch the targets and bring them up to
- XX date without executing any commands.
- XX
- XX --TT Tells ddmmaakkee to not perform transitive closure on the
- XX inference graph.
- XX
- XX --uu Force an unconditional update. (ie. do everything that
- XX would be done if everything that a target depended on
- XX was out of date)
- XX
- XX --vv[[ddffiimmtt]]
- XX Verbose flag, when making targets print to stdout what
- XX we are going to make and what we think its time stamp
- XX is. The optional flags [[ddffiimmtt]] can be used to restrict
- XX the information that is displayed. In the absence of
- XX any optional flags all are assumed to be given (ie. --vv
- XX is equivalent to --vvddffiimmtt). The meanings of the
- XX optional flags are:
- XX
- XX dd Notify of change directory operations only.
- XX
- XX ff Notify of file I/O operations only.
- XX
- XX ii Notify of inference algorithm operation only.
- XX
- XX
- XX
- XX
- XVersion 3.70 UW 3
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX mm Notify of target update operations only.
- XX
- XX tt Keep any temporary files created; normally they
- XX are automatically deleted.
- XX
- XX --VV Print the version of ddmmaakkee, and values of builtin mac-
- XX ros.
- XX
- XX --xx Upon processing the user makefile export all non-
- XX internally defined macros to the user's environment.
- XX This option together with the -e option allows SYSV
- XX AUGMAKE recursive makes to function as expected.
- XX
- XIINNDDEEXX
- XX Here is a list of the sections that follow and a short
- XX description of each. Perhaps you won't have to read the
- XX whole man page to find what you need.
- XX
- XX SSTTAARRTTUUPP Describes ddmmaakkee initialization.
- XX
- XX SSYYNNTTAAXX Describes the syntax of makefile expres-
- XX sions.
- XX
- XX AATTTTRRIIBBUUTTEESS Describes the notion of attributes and
- XX how they are used when making targets.
- XX
- XX MMAACCRROOSS Defining and expanding macros.
- XX
- XX RRUULLEESS AANNDD TTAARRGGEETTSS How to define targets and their prere-
- XX quisites.
- XX
- XX RREECCIIPPEESS How to tell ddmmaakkee how to make a target.
- XX
- XX TTEEXXTT DDIIVVEERRSSIIOONNSS How to use text diversions in recipes and
- XX macro expansions.
- XX
- XX SSPPEECCIIAALL TTAARRGGEETTSS Some targets are special.
- XX
- XX SSPPEECCIIAALL MMAACCRROOSS Macros used by ddmmaakkee to alter the pro-
- XX cessing of the makefile, and those
- XX defined by ddmmaakkee for the user.
- XX
- XX CCOONNTTRROOLL MMAACCRROOSS Itemized list of special control macros.
- XX
- XX RRUUNN--TTIIMMEE MMAACCRROOSS Discussion of special run-time macros
- XX such as $@ and $<.
- XX
- XX FFUUNNCCTTIIOONN MMAACCRROOSS GNU style function macros, only $(mktmp
- XX ...) for now.
- XX
- XX DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
- XX Processing of prerequisites which contain
- XX
- XX
- XX
- XVersion 3.70 UW 4
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX macro expansions in their name.
- XX
- XX BBIINNDDIINNGG TTAARRGGEETTSS The rules that ddmmaakkee uses to bind a tar-
- XX get to an existing file in the file sys-
- XX tem.
- XX
- XX PPEERRCCEENNTT((%%)) RRUULLEESS Specification of recipes to be used by
- XX the inference algorithm.
- XX
- XX MMAAKKIINNGG IINNFFEERREENNCCEESS The rules that ddmmaakkee uses when inferring
- XX how to make a target which has no expli-
- XX cit recipe. This and the previous sec-
- XX tion are really a single section in the
- XX text.
- XX
- XX MMAAKKIINNGG TTAARRGGEETTSS How ddmmaakkee makes targets other than
- XX libraries.
- XX
- XX MMAAKKIINNGG LLIIBBRRAARRIIEESS How ddmmaakkee makes libraries.
- XX
- XX KKEEEEPP SSTTAATTEE A discussion of how .KEEP_STATE works.
- XX
- XX MMUULLTTII PPRROOCCEESSSSIINNGG Discussion of ddmmaakkee''ss parallel make
- XX facilities for architectures that support
- XX them.
- XX
- XX CCOONNDDIITTIIOONNAALLSS Conditional expressions which control the
- XX processing of the makefile.
- XX
- XX EEXXAAMMPPLLEESS Some hopefully useful examples.
- XX
- XX CCOOMMPPAATTIIBBIILLIITTYY How ddmmaakkee compares with previous versions
- XX of make.
- XX
- XX LLIIMMIITTSS Limitations of ddmmaakkee.
- XX
- XX PPOORRTTAABBIILLIITTYY Comments on writing portable makefiles.
- XX
- XX FFIILLEESS Files used by ddmmaakkee.
- XX
- XX SSEEEE AALLSSOO Other related programs, and man pages.
- XX
- XX AAUUTTHHOORR The guy responsible for this thing.
- XX
- XX BBUUGGSS Hope not.
- XX
- XSSTTAARRTTUUPP
- XX When ddmmaakkee begins execution it first processes the command
- XX line and then processes an initial startup-makefile. This
- XX is followed by an attempt to locate and process a user sup-
- XX plied makefile. The startup file defines the default values
- XX of all required control macros and the set of default rules
- XX
- XX
- XX
- XVersion 3.70 UW 5
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX for making targets and inferences. When searching for the
- XX startup makefile, ddmmaakkee searches the following locations, in
- XX the order specified, until a startup file is located:
- XX
- XX 1. The location given as the value of the macro MAK-
- XX ESTARTUP defined on the command line.
- XX
- XX 2. The location given as the value of the environment
- XX variable MAKESTARTUP defined in the current
- XX environment.
- XX
- XX 3. The location given as the value of the macro MAK-
- XX ESTARTUP defined internally within ddmmaakkee.
- XX
- XX The above search is disabled by specifying the -r option on
- XX the command line. An error is issued if a startup makefile
- XX cannot be found and the -r option was not specified. A user
- XX may substitute a custom startup file by defining the MAKES-
- XX TARTUP environment variable or by redefining the MAKESTARTUP
- XX macro on the command line. To determine where ddmmaakkee looks
- XX for the default startup file, check your environment or
- XX issue the command _"_d_m_a_k_e _-_V_".
- XX
- XX A similar search is performed to locate a default user
- XX makefile when no --ff command line option is specified. By
- XX default, the prerequisite list of the special target
- XX .MAKEFILES specifies the names of possible makefiles and the
- XX search order that ddmmaakkee should use to determine if one
- XX exists. A typical definition for this target is:
- XX
- XX .MAKEFILES : makefile.mk Makefile makefile
- XX
- XX ddmmaakkee will first look for makefile.mk and then the others.
- XX If a prerequisite cannot be found ddmmaakkee will try to make it
- XX before going on to the next prerequisite. For example,
- XX makefile.mk can be checked out of an RCS file if the proper
- XX rules for doing so are defined in the startup file.
- XX
- XSSYYNNTTAAXX
- XX This section is a summary of the syntax of makefile state-
- XX ments. The description is given in a style similar to BNF,
- XX where { } enclose items that may appear zero or more times,
- XX and [ ] enclose items that are optional. Alternative pro-
- XX ductions for a left hand side are indicated by '->', and
- XX newlines are significant. All symbols in bboolldd type are text
- XX or names representing text supplied by the user.
- XX
- XX
- XX
- XX Makefile -> { Statement }
- XX
- XX
- XX
- XX
- XX
- XVersion 3.70 UW 6
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX Statement -> Macro-Definition
- XX -> Conditional
- XX -> Rule-Definition
- XX -> Attribute-Definition
- XX
- XX Macro-Definition -> MMAACCRROO == LLIINNEE
- XX -> MMAACCRROO **== LLIINNEE
- XX -> MMAACCRROO ::== LLIINNEE
- XX -> MMAACCRROO **::== LLIINNEE
- XX -> MMAACCRROO ++== LLIINNEE
- XX -> MMAACCRROO ++::== LLIINNEE
- XX
- XX Conditional -> ..IIFF expression
- XX Makefile
- XX [ ..EELLIIFF expression
- XX Makefile ]
- XX [ ..EELLSSEE
- XX Makefile ]
- XX ..EENNDD
- XX
- XX expression -> LLIINNEE
- XX -> SSTTRRIINNGG ==== LLIINNEE
- XX -> SSTTRRIINNGG !!== LLIINNEE
- XX
- XX
- XX Rule-Definition -> target-definition
- XX [ recipe ]
- XX
- XX target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
- XX
- XX targets -> target { targets }
- XX -> ""target"" { targets }
- XX
- XX target -> special-target
- XX -> TTAARRGGEETT
- XX
- XX attrs -> attribute { attrs }
- XX -> ""attribute"" { attrs }
- XX
- XX op -> :: { modifier }
- XX
- XX modifier -> ::
- XX -> ^^
- XX -> !!
- XX -> --
- XX
- XX recipe -> { TTAABB rcp-line }
- XX -> [@@][%%][--] [[
- XX { LLIINNEE }
- XX ]]
- XX
- XX
- XX
- XX
- XX
- XVersion 3.70 UW 7
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX rcp-line -> [@@][%%][--][++] LLIINNEE
- XX
- XX
- XX Attribute-Definition -> attrs :: targets
- XX
- XX
- XX attribute -> ..EEPPIILLOOGG
- XX -> ..IIGGNNOORREE
- XX -> ..LLIIBBRRAARRYY
- XX -> ..MMKKSSAARRGGSS
- XX -> ..NNOOIINNFFEERR
- XX -> ..NNOOSSTTAATTEE
- XX -> ..PPHHOONNYY
- XX -> ..PPRREECCIIOOUUSS
- XX -> ..PPRROOLLOOGG
- XX -> ..SSEETTDDIIRR==_p_a_t_h
- XX -> ..SSIILLEENNTT
- XX -> ..SSEEQQUUEENNTTIIAALL
- XX -> ..SSWWAAPP
- XX -> ..UUSSEESSHHEELLLL
- XX -> ..SSYYMMBBOOLL
- XX -> ..UUPPDDAATTEEAALLLL
- XX
- XX special-target -> ..EERRRROORR
- XX -> ..EEXXPPOORRTT
- XX -> ..GGRROOUUPPEEPPIILLOOGG
- XX -> ..GGRROOUUPPPPRROOLLOOGG
- XX -> ..IIMMPPOORRTT
- XX -> ..IINNCCLLUUDDEE
- XX -> ..IINNCCLLUUDDEEDDIIRRSS
- XX -> ..MMAAKKEEFFIILLEESS
- XX -> ..RREEMMOOVVEE
- XX -> ..SSOOUURRCCEE
- XX -> ..SSOOUURRCCEE.._s_u_f_f_i_x
- XX -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
- XX
- XX
- XX Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
- XX an arbitrary sequence of characters, and LLIINNEE represents a
- XX possibly empty sequence of characters terminated by a non-
- XX escaped (not immediately preceded by a backslash '\') new-
- XX line character. MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
- XX represent a string of characters not including space or tab
- XX which respectively form the name of a macro, prerequisite or
- XX target. The name may itself be a macro expansion expres-
- XX sion. A LLIINNEE can be continued over several physical lines
- XX by terminating it with a single backslash character. Com-
- XX ments are initiated by the pound ## character and extend to
- XX the end of line. All comment text is discarded, a '#' may
- XX be placed into the makefile text by escaping it with '\'
- XX (ie. \# translates to # when it is parsed). An exception to
- XX this occurs when a # is seen inside a recipe line that
- XX
- XX
- XX
- XVersion 3.70 UW 8
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX begins with a <tab> or is inside a group recipe. If you
- XX specify the --cc command line switch then this behavior is
- XX disabled and ddmmaakkee will treat all # characters as start of
- XX comment indicators unless they are escaped by \. A set of
- XX continued lines may be commented out by placing a single #
- XX at the start of the first line. A continued line cannot
- XX span more than one makefile.
- XX
- XX wwhhiittee ssppaaccee is defined to be any combination of <space>,
- XX <tab>, and the sequence \<nl> when \<nl> is used to ter-
- XX minate a LINE. When processing mmaaccrroo definition lines, any
- XX amount of white space is allowed on either side of the macro
- XX operator (=, *=, :=, *:=, += or +:=), and white space is
- XX stripped from both before and after the macro value string.
- XX The sequence \<nl> is treated as white space during recipe
- XX expansion and is deleted from the final recipe string. You
- XX must escape the \<nl> with another \ in order to get a \ at
- XX the end of a recipe line. The \<nl> sequence is deleted
- XX from macro values when they are expanded.
- XX
- XX When processing ttaarrggeett definition lines, the recipe for a
- XX target must, in general, follow the first definition of the
- XX target (See the RULES AND TARGETS section for an exception),
- XX and the recipe may not span across multiple makefiles. Any
- XX targets and prerequisites found on a target definition line
- XX are taken to be white space separated tokens. The rule
- XX operator (_o_p in SYNTAX section) is also considered to be a
- XX token but does not require white space to precede or follow
- XX it. Since the rule operator begins with a `:', traditional
- XX versions of make do not allow the `:' character to form a
- XX valid target name. ddmmaakkee allows `:' to be present in
- XX target/prerequisite names as long as the entire
- XX target/prerequisite name is quoted. For example:
- XX
- XX a:fred : test
- XX
- XX would be parsed as TARGET = a, PREREQUISITES={fred, :,
- XX test}, which is not what was intended. To fix this you must
- XX write:
- XX
- XX "a:fred" : test
- XX
- XX Which will be parsed as expected. See the EXAMPLES section
- XX for how to apply "" quoting to a list of targets.
- XX
- XAATTTTRRIIBBUUTTEESS
- XX ddmmaakkee defines several target attributes. Attributes may be
- XX assigned to a single target, a group of targets, or to all
- XX targets in the makefile. Attributes are used to modify
- XX ddmmaakkee actions during target update. The recognized attri-
- XX butes are:
- XX
- XX
- XX
- XX
- XVersion 3.70 UW 9
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX ..EEPPIILLOOGG Insert shell epilog code when executing a group
- XX recipe associated with any target having this
- XX attribute set.
- XX
- XX ..IIGGNNOORREE Ignore an error when trying to make any target
- XX with this attribute set.
- XX
- XX ..LLIIBBRRAARRYY Target is a library.
- XX
- XX ..MMKKSSAARRGGSS If running in an MSDOS environment then use MKS
- XX extended argument passing conventions to pass
- XX arguments to commands. Non-MSDOS environments
- XX ignore this attribute.
- XX
- XX ..NNOOIINNFFEERR Any target with this attribute set will not be
- XX subjected to transitive closure if it is
- XX inferred as a prerequisite of a target whose
- XX recipe and prerequisites are being inferred.
- XX (i.e. the inference algorithm will not use any
- XX prerequisite with this attribute set, as a tar-
- XX get) If specified as '.NOINFER:' (ie. with no
- XX prerequisites or targets) then the effect is
- XX equivalent to specifying --TT on the command line.
- XX
- XX ..NNOOSSTTAATTEE Any target with this attribute set will not have
- XX command line flag information stored in the
- XX state file if .KEEP_STATE has been enabled.
- XX
- XX ..PPHHOONNYY Any target with this attribute set will have its
- XX recipe executed each time the target is made
- XX even if a file matching the target name can be
- XX located. Any targets that have a .PHONY attri-
- XX buted target as a prerequisite will be made each
- XX time the .PHONY attributed prerequisite is made.
- XX
- XX ..PPRREECCIIOOUUSS Do not remove associated target under any cir-
- XX cumstances. Set by default for any targets
- XX whose corresponding files exist in the file sys-
- XX tem prior to the execution of ddmmaakkee.
- XX
- XX ..PPRROOLLOOGG Insert shell prolog code when executing a group
- XX recipe associated with any target having this
- XX attribute set.
- XX
- XX ..SSEEQQUUEENNTTIIAALL Force a sequential make of the associated
- XX target's prerequisites.
- XX
- XX ..SSEETTDDIIRR Change current working directory to specified
- XX directory when making the associated target.
- XX You must specify the directory at the time the
- XX attribute is specified. To do this simply give
- XX _._S_E_T_D_I_R_=_p_a_t_h as the attribute. _p_a_t_h is expanded
- XX
- XX
- XX
- XVersion 3.70 UW 10
- XX
- XX
- XX
- XX
- XDMAKE(p) Unsupported Free Software DMAKE(p)
- XX
- XX
- XX
- XX and the result is used as the value of the
- XX directory to change to. If path is surrounded
- XX by single quotes then path is not expanded, and
- XX is used literally as the directory name. If the
- XX _p_a_t_h contains any `:' characters then the entire
- SHAR_EOF
- true || echo 'restore of dm37p2 failed'
- fi
- echo 'End of part 1'
- echo 'File dm37p2 is continued in part 2'
- echo 2 > _shar_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-